from const.byte_order_enum import ByteOrder
from const.charset_enum import Charset
from const.dot_matrix_style import DotMatrixStyle
from const.font_enum import Font
from const.font_mode_enum import FontMode

CANVAS_SIZE = 200


class Param:

    def __init__(self,
                 charset=Charset.GBK.name.lower(), charsetStart='0', charsetEnd='0',
                 font=Font.SIMSUN.name.lower(), fontHeight='16', fontWidth='16',
                 mode=FontMode.V_FIRST_TOP_BOTTOM__LAST_LEFT_RIGHT.name.lower(),
                 byte_order=ByteOrder.BIG.name.lower(), dotMatrixStyle=DotMatrixStyle.POSITIVE.name.lower(),
                 location='', callback=None):
        """
        param to generate dot matrix
        :param font:        simsun, simli, simkai etc.
        :param charset:     GBK, Unicode etc.
        :param charsetStart:the head of charset region
        :param charsetEnd:  the tail of charset region
        :param fontHeight:  font height: 12, 16, 24
        :param fontWidth:   font width: 12, 16, 24
        :param mode:        {@see FontMode}
        :param byte_order:  small, big
        :param location:    where the font library save
        :param callback:    invoke after generating every char
        """
        self.font = font
        self.charset = charset
        self.charsetStart = charsetStart
        self.charsetEnd = charsetEnd
        self.fontHeight = fontHeight
        self.fontWidth = fontWidth
        self.dotMatrixMode = mode
        self.byteOrder = byte_order
        self.dotMatrixStyle = dotMatrixStyle
        self.location = location
        self.callback = callback
